package cn.virens.util.ztree;

/**
 * Ztree Checkbox/Radio 节点
 * 
 * @作者 :loioi
 * @创建时间 :2016年12月19日
 */
public class CheckNode<I> extends Node<I> {
	private Boolean checked = false;
	private Boolean chkDisabled = false;

	public CheckNode() {
		super();
	}

	public CheckNode(String name) {
		super(name);
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Object obj) {
		if (obj instanceof Boolean) {
			this.checked = (Boolean) obj;
		} else if (obj instanceof Number) {
			this.checked = ((Number) obj).intValue() > 0;
		} else if (obj != null) {
			this.checked = true;
		} else {
			this.checked = false;
		}
	}

	public Boolean getChkDisabled() {
		return chkDisabled;
	}

	public void setChkDisabled(Boolean chkDisabled) {
		this.chkDisabled = chkDisabled;
	}
}
